﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Library
{
    public class Makulatura: IComparable
    {
        public int price { get; set; }
        public string brend { get; set; }
        public int size { get; set; }
        public virtual string name { get; set; }
        public int CompareTo(object obj) 
        {
  
            if (obj == null) return 1;
        Makulatura temp = obj as Makulatura;
        if (temp != null) 
            return this.size.CompareTo(temp.size);
        else
                throw new ArgumentException("Parametr is not a car");
        }
    }
}
